A cache is a component introduced to improve performance of a storage system and is mainly configured to improve input/output (I/O) performance of the entire system. Some temporary data is stored in this cache, thereby accelerating an I/O response of a host. For a read operation of the host, the system temporarily stores read data in the cache and the cache can be hit directly during the read operation of the host, thereby omitting the operation of accessing at least one hard disk. For a write operation of the host, the system directly caches write data of the host into the cache, thereby omitting the operation of writing data into at least one hard disk. In order to perform the read or write operation smoothly, the data can be prefetched from at least one hard disk into the cache according to a certain policy, where the data is likely to be read by the host next time. This operation can raise a cache hit ratio. In addition, the data written into the cache can be combined based on a certain combination policy before writing the data into the hard disk, thereby reducing the time of implementing the write operation. As can be seen from the above, for read operation, the cache hit ratio can be raised by optimizing a prefetch algorithm or increasing the size of the cache, thereby improving the read performance of the entire storage system. However, when the cache is enlarged to a certain extent, a performance improvement of the read operation and an increase in the size of the cache are disproportionate. Quality of service (QoS) is a quality convention on information transmission and sharing between a network and a user and between users that communicate with each other on the network. The quality of service may include a transmission bandwidth, a transmission delay, a packet loss rate of data, and the like. On the network, the quality of service can be improved by taking measures such as ensuring the transmission bandwidth and reducing the transmission delay, the packet loss rate, and delay variation.
A current storage system supports mixed insertion of various types of hard disks. However, rotational speeds and throughput of different types of disks are different. This always leads to a processing performance difference during writing data into different hard disks. In addition, even for disks of a same type, a processing capability difference may also be caused due to manufacturers or an aging problem. In this scenario, data written into a cache cannot be released in time because of a processing capability difference of back-end disks. As a result, a slow-processing disk occupies more and more page resources, and a processing speed of a fast-processing disk is affected because no cache page is allocated to the fast-processing disk. In addition, even the processing performance of the entire system levels off to that of the slowest disk on the system, that is, the cask effect occurs.
In the prior art, the preceding problem is solved by using a cache partition technology. FIG. 1 is a schematic diagram of an application scenario of a cache partition technology in the prior art. In the prior art, the cache partition technology is used to divide cache resources into multiple cache partitions according to services on a host, each cache partition corresponds to one or more hosts, and the cache partitions are independent of each other and do not affect each other. However, in the prior art, a page resource preemption phenomenon still occurs in each cache partition. As a result, the performance (such as a transmission delay and a packet loss rate) of a service corresponding to a cache partition is affected by the slowest back-end disk, and the quality of service of the storage system is reduced.